import request from '@/utils/request'

// 查询布种资料列表
export function listCloth(query) {
  return request({
    url: '/cloth/cloth/list',
    method: 'get',
    params: query
  })
}

// 查询客户任务列表
export function getAllTaskByCusId(userId) {
  return request({
    url: '/cloth/cloth/allTaskByCusId/' + userId,
    method: 'get',
  })
}


//布种选择下拉列表
export function selectMulclo(query) {
  return request({
    url: '/cloth/cloth/mulclo',
    method: 'get',
    params: query
  })
}

// 查询布种资料详细
export function getCloth(clId) {
  return request({
    url: '/cloth/cloth/' + clId,
    method: 'get'
  })
}

// 新增布种资料
export function addCloth(data) {
  return request({
    url: '/cloth/cloth',
    method: 'post',
    data: data
  })
}

// 修改布种资料
export function updateCloth(data) {
  return request({
    url: '/cloth/cloth',
    method: 'put',
    data: data
  })
}

// 删除布种资料
export function delCloth(clId) {
  return request({
    url: '/cloth/cloth/' + clId,
    method: 'delete'
  })
}
